package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbActivityOrderMapper;
import com.ruoyi.system.domain.TbActivityOrder;
import com.ruoyi.system.service.ITbActivityOrderService;

/**
 * 亲社会行为订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbActivityOrderServiceImpl implements ITbActivityOrderService 
{
    @Autowired
    private TbActivityOrderMapper tbActivityOrderMapper;

    /**
     * 查询亲社会行为订单
     * 
     * @param id 亲社会行为订单主键
     * @return 亲社会行为订单
     */
    @Override
    public TbActivityOrder selectTbActivityOrderById(Long id)
    {
        return tbActivityOrderMapper.selectTbActivityOrderById(id);
    }

    /**
     * 查询亲社会行为订单列表
     * 
     * @param tbActivityOrder 亲社会行为订单
     * @return 亲社会行为订单
     */
    @Override
    public List<TbActivityOrder> selectTbActivityOrderList(TbActivityOrder tbActivityOrder)
    {
        return tbActivityOrderMapper.selectTbActivityOrderList(tbActivityOrder);
    }

    /**
     * 新增亲社会行为订单
     * 
     * @param tbActivityOrder 亲社会行为订单
     * @return 结果
     */
    @Override
    public int insertTbActivityOrder(TbActivityOrder tbActivityOrder)
    {
        tbActivityOrder.setCreateTime(DateUtils.getNowDate());
        return tbActivityOrderMapper.insertTbActivityOrder(tbActivityOrder);
    }

    /**
     * 修改亲社会行为订单
     * 
     * @param tbActivityOrder 亲社会行为订单
     * @return 结果
     */
    @Override
    public int updateTbActivityOrder(TbActivityOrder tbActivityOrder)
    {
        return tbActivityOrderMapper.updateTbActivityOrder(tbActivityOrder);
    }

    /**
     * 批量删除亲社会行为订单
     * 
     * @param ids 需要删除的亲社会行为订单主键
     * @return 结果
     */
    @Override
    public int deleteTbActivityOrderByIds(Long[] ids)
    {
        return tbActivityOrderMapper.deleteTbActivityOrderByIds(ids);
    }

    /**
     * 删除亲社会行为订单信息
     * 
     * @param id 亲社会行为订单主键
     * @return 结果
     */
    @Override
    public int deleteTbActivityOrderById(Long id)
    {
        return tbActivityOrderMapper.deleteTbActivityOrderById(id);
    }
}
